package plugin.lombok;

import lombok.Data;

import java.util.Date;

/**相当于get set tostring hashCode equals 还有构造函数
 * 或者写一个参数用来做工厂类
 * Created by yangliwei on 2017/11/9.
 */
//@Data
//public class DataTest {
//    private String name;
//    private Date birthday;
//
//    //这里面的getset方法都是生成的,使用的是默认构造函数
//
//    public static void main(String[] args) {
//        DataTest test = new DataTest();
//        test.getName();
//        test.setName(new Long(System.nanoTime()).toString());
//        test.setBirthday(new Date());
//
//    }
//}


/**
 *
 package plugin.lombok;

 import java.util.Date;

 public class DataTest {
 private String name;
 private Date birthday;

 public static void main(String[] args) {
 DataTest test = new DataTest();
 test.getName();
 test.setName((new Long(System.nanoTime())).toString());
 test.setBirthday(new Date());
 }

 public DataTest() {
 }

 public String getName() {
 return this.name;
 }

 public Date getBirthday() {
 return this.birthday;
 }

 public void setName(String name) {
 this.name = name;
 }

 public void setBirthday(Date birthday) {
 this.birthday = birthday;
 }

 public boolean equals(Object o) {
 if(o == this) {
 return true;
 } else if(!(o instanceof DataTest)) {
 return false;
 } else {
 DataTest other = (DataTest)o;
 if(!other.canEqual(this)) {
 return false;
 } else {
 String this$name = this.getName();
 String other$name = other.getName();
 if(this$name == null) {
 if(other$name != null) {
 return false;
 }
 } else if(!this$name.equals(other$name)) {
 return false;
 }

 Date this$birthday = this.getBirthday();
 Date other$birthday = other.getBirthday();
 if(this$birthday == null) {
 if(other$birthday != null) {
 return false;
 }
 } else if(!this$birthday.equals(other$birthday)) {
 return false;
 }

 return true;
 }
 }
 }

 protected boolean canEqual(Object other) {
 return other instanceof DataTest;
 }

 public int hashCode() {
 boolean PRIME = true;
 byte result = 1;
 String $name = this.getName();
 int result1 = result * 59 + ($name == null?43:$name.hashCode());
 Date $birthday = this.getBirthday();
 result1 = result1 * 59 + ($birthday == null?43:$birthday.hashCode());
 return result1;
 }

 public String toString() {
 return "DataTest(name=" + this.getName() + ", birthday=" + this.getBirthday() + ")";
 }
 }

 */
